package dominia;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;

import org.apache.log4j.Logger;

import org.eclipse.swt.graphics.RGB;

/**
 * This class implements configuration management for the JMTG client.
 *
 *
 * @author jfbrousseau
 *
 */
public class Config extends Properties {

	private Logger   logger;
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public Config()
	{
		logger = Logger.getLogger(this.getClass());
		this.setProperty("display.width", "800");
		this.setProperty("display.height", "600");
	}

	public Config(String filename)
	  throws IOException
	{
		this();

		FileInputStream fis = null;

		try {
			fis = new FileInputStream(new File(filename));
		} catch (FileNotFoundException e) {
			logger.error("Configuration file " + filename + " not found");
			return;
		}

		this.load(fis);		
	}
	
	public void save()
	{
		
	}

}
